package com.ly.designpatten.prototype;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @Classname Sheep
 * @Description TODO
 * @Date 2020/10/8 10:09
 * @Author 冷心影翼
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Sheep implements Serializable, Cloneable {

	private String name;

	private int age;

	private String color;

	private Sheep friend;

	@Override
	protected Object clone()  {
		Object sheep = null;
		try{
			sheep = super.clone();
		}catch(Exception e){
			e.printStackTrace();
		}finally {

		}
		return sheep;
	}
}
